//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 2000,
    duration: 500
  },
  // 生命周期
  onLoad() {
    // 请求轮播图
    wx.request({
        url: "https://locally.uieee.com/slides",
        method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
        success: (res) => {
          // console.log(res.data)
          this.setData({
            list: res.data
          })
        }
      }),
      wx.request({
        url: "https://locally.uieee.com/categories",
        method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
        success: (res) => {
          // console.log(res.data)
          this.setData({
            nine: res.data
          })
        }
      })
  },
  tiao(e){
    // console.log(e)
    let index=e.currentTarget.dataset.index
    wx.request({
      url: "https://locally.uieee.com/categories/1/shops",
      method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
      success: (res) => {
        console.log(res.data)
   
      }
    })
  

  }
})